package com.maywide.jdp.system.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.maywide.jdp.system.entities.Shortcut;

/**
 * 快捷方式管理Service接口
 * 
 * @author luoyang
 * @version 1.0
 * @since JDK1.6
 */
public interface ShortcutService extends LockedService, MovedService {

	/**
	 * 新增快捷方式
	 * 
	 * @param shortcut
	 *            快捷方式对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Shortcut 新增后的对象
	 */
	public Shortcut insert(Shortcut shortcut,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;

	/**
	 * 修改快捷方式
	 * 
	 * @param shortcutVO
	 *            快捷方式对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Shortcut 修改后的对象
	 */
	public Shortcut update(Shortcut shortcutVO,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;

	/**
	 * 修改快捷方式
	 * 
	 * @param shortcutVO
	 *            快捷方式对象
	 * @param appType 应用类型
	 * @param request
	 *            HttpServletRequest对象
	 * @return Shortcut 修改后的对象
	 */
	public Shortcut updateApp(Shortcut shortcutVO,String appType,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;

	/**
	 * 读取快捷方式
	 * 
	 * @param id
	 *            快捷方式ID
	 * @param request
	 *            HttpServletRequest对象
	 * @return Shortcut 读取的快捷方式对象
	 */
	public Shortcut load(String id, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * 获得某个登录用户的启动快捷方式
	 * @param context 登录上下文
	 * @return 快捷方式VO列表
	 */
	public List<Shortcut> getStartShortcuts(String parentID,HttpServletRequest request, HttpServletResponse response, HttpSession session) throws Exception;
}
